123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280 |
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[tb_ErpSatisfactionRatingSet](
- [ID] [int] IDENTITY(1,1) NOT NULL,
- [Sfrs_Name] [nvarchar](50) NULL,
- [Sfrs_Scores] [int] NULL,
- [Sfrs_TotalPoints] [int] NULL,
- [Sfrs_CreateTime] [datetime] NULL,
- [Sfrs_CreateName] [nvarchar](50) NULL,
- [Sfrs_UpdateTime] [datetime] NULL,
- [Sfrs_UpdateName] [nvarchar](50) NULL,
- CONSTRAINT [PK_tb_ErpSatisfactionRatingSet] PRIMARY KEY CLUSTERED
- (
- [ID] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
- ) ON [PRIMARY]
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'自增长ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionRatingSet', @level2type=N'COLUMN',@level2name=N'ID'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionRatingSet', @level2type=N'COLUMN',@level2name=N'Sfrs_Name'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'单项分值' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionRatingSet', @level2type=N'COLUMN',@level2name=N'Sfrs_Scores'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'总分值' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionRatingSet', @level2type=N'COLUMN',@level2name=N'Sfrs_TotalPoints'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionRatingSet', @level2type=N'COLUMN',@level2name=N'Sfrs_CreateTime'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionRatingSet', @level2type=N'COLUMN',@level2name=N'Sfrs_CreateName'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionRatingSet', @level2type=N'COLUMN',@level2name=N'Sfrs_UpdateTime'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionRatingSet', @level2type=N'COLUMN',@level2name=N'Sfrs_UpdateName'
- GO
- EXEC sys.sp_addextendedproperty @name=N'tb_ErpSatisfactionRatingSet', @value=N'满意度评分设置表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionRatingSet'
- INSERT [dbo].[tb_ErpSatisfactionRatingSet] ( [Sfrs_Name], [Sfrs_Scores], [Sfrs_TotalPoints], [Sfrs_CreateTime], [Sfrs_CreateName], [Sfrs_UpdateTime], [Sfrs_UpdateName]) VALUES ( N'非常满意', 5, 80, CAST(0x0000A4CF011693D9 AS DateTime), N'管理员', CAST(0x0000A4CF011753A3 AS DateTime), N'管理员')
- INSERT [dbo].[tb_ErpSatisfactionRatingSet] ( [Sfrs_Name], [Sfrs_Scores], [Sfrs_TotalPoints], [Sfrs_CreateTime], [Sfrs_CreateName], [Sfrs_UpdateTime], [Sfrs_UpdateName]) VALUES ( N'满意', 4, 60, CAST(0x0000A4CF0116A3D5 AS DateTime), N'管理员', CAST(0x0000A4CF01174DD6 AS DateTime), N'管理员')
- INSERT [dbo].[tb_ErpSatisfactionRatingSet] ( [Sfrs_Name], [Sfrs_Scores], [Sfrs_TotalPoints], [Sfrs_CreateTime], [Sfrs_CreateName], [Sfrs_UpdateTime], [Sfrs_UpdateName]) VALUES ( N'一般', 3, 40, CAST(0x0000A4CF0116D9E1 AS DateTime), N'管理员', CAST(0x0000A4CF01174953 AS DateTime), N'管理员')
- INSERT [dbo].[tb_ErpSatisfactionRatingSet] ( [Sfrs_Name], [Sfrs_Scores], [Sfrs_TotalPoints], [Sfrs_CreateTime], [Sfrs_CreateName], [Sfrs_UpdateTime], [Sfrs_UpdateName]) VALUES ( N'不满意', 2, 20, CAST(0x0000A4CF0116F115 AS DateTime), N'管理员', CAST(0x0000A4CF01173E3D AS DateTime), N'管理员')
- INSERT [dbo].[tb_ErpSatisfactionRatingSet] ( [Sfrs_Name], [Sfrs_Scores], [Sfrs_TotalPoints], [Sfrs_CreateTime], [Sfrs_CreateName], [Sfrs_UpdateTime], [Sfrs_UpdateName]) VALUES ( N'非常不满意', 1, 0, CAST(0x0000A4CF0117029D AS DateTime), N'管理员', CAST(0x0000A4CF0117595B AS DateTime), N'管理员')
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[tb_ErpSatisfactionReturningMattersSet](
- [ID] [int] IDENTITY(1,1) NOT NULL,
- [Sfrms_SurveySetID] [int] NULL,
- [Sfrms_Contents] [nvarchar](max) NULL,
- [Sfrms_EnableStatus] [int] NULL,
- [Sfrms_CreateTime] [datetime] NULL,
- [Sfrms_CreateName] [nvarchar](50) NULL,
- [Sfrms_UpdateTime] [datetime] NULL,
- [Sfrms_UpdateName] [nvarchar](50) NULL,
- CONSTRAINT [PK_tb_ErpSatisfactionReturningMattersSet] PRIMARY KEY CLUSTERED
- (
- [ID] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
- ) ON [PRIMARY]
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'自动增长ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionReturningMattersSet', @level2type=N'COLUMN',@level2name=N'ID'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'对象名称ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionReturningMattersSet', @level2type=N'COLUMN',@level2name=N'Sfrms_SurveySetID'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionReturningMattersSet', @level2type=N'COLUMN',@level2name=N'Sfrms_Contents'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'启用状态(0:启用 1:不启用)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionReturningMattersSet', @level2type=N'COLUMN',@level2name=N'Sfrms_EnableStatus'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionReturningMattersSet', @level2type=N'COLUMN',@level2name=N'Sfrms_CreateTime'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionReturningMattersSet', @level2type=N'COLUMN',@level2name=N'Sfrms_CreateName'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionReturningMattersSet', @level2type=N'COLUMN',@level2name=N'Sfrms_UpdateTime'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionReturningMattersSet', @level2type=N'COLUMN',@level2name=N'Sfrms_UpdateName'
- GO
- EXEC sys.sp_addextendedproperty @name=N'tb_ErpSatisfactionReturningMattersSet', @value=N'满意度调查回访事项设置表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionReturningMattersSet'
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[tb_ErpSatisfactionSurveySet](
- [ID] [int] IDENTITY(1,1) NOT NULL,
- [Sfss_Name] [nvarchar](50) NULL,
- [Sfss_EnableStatus] [int] NULL,
- [Sfss_DeleteStatus] [int] NULL,
- [Sfss_Type] [nvarchar](1) NULL,
- [Sfss_CreateTime] [datetime] NULL,
- [Sfss_CreateName] [nvarchar](50) NULL,
- [Sfss_UpdateTime] [datetime] NULL,
- [Sfss_UpdateName] [nvarchar](50) NULL,
- CONSTRAINT [PK_tb_ErpSatisfactionSurveySet] PRIMARY KEY CLUSTERED
- (
- [ID] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
- ) ON [PRIMARY]
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'自增长ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionSurveySet', @level2type=N'COLUMN',@level2name=N'ID'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'对象名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionSurveySet', @level2type=N'COLUMN',@level2name=N'Sfss_Name'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'启用状态(0:启用 1:不启用)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionSurveySet', @level2type=N'COLUMN',@level2name=N'Sfss_EnableStatus'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'删除状态(0:可删除 1:不可删除)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionSurveySet', @level2type=N'COLUMN',@level2name=N'Sfss_DeleteStatus'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类型(0:订单 1:选衣 2:拍照 3:选片 4:看样 5:取件 6:服务)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionSurveySet', @level2type=N'COLUMN',@level2name=N'Sfss_Type'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionSurveySet', @level2type=N'COLUMN',@level2name=N'Sfss_CreateTime'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionSurveySet', @level2type=N'COLUMN',@level2name=N'Sfss_CreateName'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionSurveySet', @level2type=N'COLUMN',@level2name=N'Sfss_UpdateTime'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionSurveySet', @level2type=N'COLUMN',@level2name=N'Sfss_UpdateName'
- GO
- EXEC sys.sp_addextendedproperty @name=N'tb_ErpSatisfactionSurveySet', @value=N'满意度调查对象设置表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionSurveySet'
- INSERT [dbo].[tb_ErpSatisfactionSurveySet] ( [Sfss_Name], [Sfss_EnableStatus], [Sfss_DeleteStatus], [Sfss_Type], [Sfss_CreateTime], [Sfss_CreateName], [Sfss_UpdateTime], [Sfss_UpdateName]) VALUES ( N'接单门市', 0, 0, N'0', CAST(0x0000A4BF00E8A972 AS DateTime), N'管理员', NULL, NULL)
- INSERT [dbo].[tb_ErpSatisfactionSurveySet] ( [Sfss_Name], [Sfss_EnableStatus], [Sfss_DeleteStatus], [Sfss_Type], [Sfss_CreateTime], [Sfss_CreateName], [Sfss_UpdateTime], [Sfss_UpdateName]) VALUES ( N'礼服师', 0, 0, N'1', CAST(0x0000A4BF00E8D365 AS DateTime), N'管理员', NULL, NULL)
- INSERT [dbo].[tb_ErpSatisfactionSurveySet] ( [Sfss_Name], [Sfss_EnableStatus], [Sfss_DeleteStatus], [Sfss_Type], [Sfss_CreateTime], [Sfss_CreateName], [Sfss_UpdateTime], [Sfss_UpdateName]) VALUES ( N'摄影师', 0, 0, N'2', CAST(0x0000A4BF00E8F798 AS DateTime), N'管理员', NULL, NULL)
- INSERT [dbo].[tb_ErpSatisfactionSurveySet] ( [Sfss_Name], [Sfss_EnableStatus], [Sfss_DeleteStatus], [Sfss_Type], [Sfss_CreateTime], [Sfss_CreateName], [Sfss_UpdateTime], [Sfss_UpdateName]) VALUES ( N'摄影助理', 0, 0, N'2', CAST(0x0000A4BF00E901AA AS DateTime), N'管理员', NULL, NULL)
- INSERT [dbo].[tb_ErpSatisfactionSurveySet] ( [Sfss_Name], [Sfss_EnableStatus], [Sfss_DeleteStatus], [Sfss_Type], [Sfss_CreateTime], [Sfss_CreateName], [Sfss_UpdateTime], [Sfss_UpdateName]) VALUES ( N'化妆师', 0, 0, N'2', CAST(0x0000A4BF00E9070E AS DateTime), N'管理员', NULL, NULL)
- INSERT [dbo].[tb_ErpSatisfactionSurveySet] ( [Sfss_Name], [Sfss_EnableStatus], [Sfss_DeleteStatus], [Sfss_Type], [Sfss_CreateTime], [Sfss_CreateName], [Sfss_UpdateTime], [Sfss_UpdateName]) VALUES ( N'化妆助理', 0, 0, N'2', CAST(0x0000A4BF00E90FF4 AS DateTime), N'管理员', NULL, NULL)
- INSERT [dbo].[tb_ErpSatisfactionSurveySet] ( [Sfss_Name], [Sfss_EnableStatus], [Sfss_DeleteStatus], [Sfss_Type], [Sfss_CreateTime], [Sfss_CreateName], [Sfss_UpdateTime], [Sfss_UpdateName]) VALUES ( N'引导师', 0, 0, N'2', CAST(0x0000A4BF00E91614 AS DateTime), N'管理员', NULL, NULL)
- INSERT [dbo].[tb_ErpSatisfactionSurveySet] ( [Sfss_Name], [Sfss_EnableStatus], [Sfss_DeleteStatus], [Sfss_Type], [Sfss_CreateTime], [Sfss_CreateName], [Sfss_UpdateTime], [Sfss_UpdateName]) VALUES ( N'选片师', 0, 0, N'3', CAST(0x0000A4BF00E964F4 AS DateTime), N'管理员', NULL, NULL)
- INSERT [dbo].[tb_ErpSatisfactionSurveySet] ( [Sfss_Name], [Sfss_EnableStatus], [Sfss_DeleteStatus], [Sfss_Type], [Sfss_CreateTime], [Sfss_CreateName], [Sfss_UpdateTime], [Sfss_UpdateName]) VALUES ( N'初修师', 0, 0, N'3', CAST(0x0000A4BF00E96F79 AS DateTime), N'管理员', NULL, NULL)
- INSERT [dbo].[tb_ErpSatisfactionSurveySet] ( [Sfss_Name], [Sfss_EnableStatus], [Sfss_DeleteStatus], [Sfss_Type], [Sfss_CreateTime], [Sfss_CreateName], [Sfss_UpdateTime], [Sfss_UpdateName]) VALUES ( N'精修师', 0, 0, N'3', CAST(0x0000A4BF00E974D5 AS DateTime), N'管理员', NULL, NULL)
- INSERT [dbo].[tb_ErpSatisfactionSurveySet] ( [Sfss_Name], [Sfss_EnableStatus], [Sfss_DeleteStatus], [Sfss_Type], [Sfss_CreateTime], [Sfss_CreateName], [Sfss_UpdateTime], [Sfss_UpdateName]) VALUES ( N'看设计师', 0, 0, N'4', CAST(0x0000A4BF00E9A371 AS DateTime), N'管理员', NULL, NULL)
- INSERT [dbo].[tb_ErpSatisfactionSurveySet] ( [Sfss_Name], [Sfss_EnableStatus], [Sfss_DeleteStatus], [Sfss_Type], [Sfss_CreateTime], [Sfss_CreateName], [Sfss_UpdateTime], [Sfss_UpdateName]) VALUES ( N'设计师', 0, 0, N'4', CAST(0x0000A4BF00E9AE0A AS DateTime), N'管理员', NULL, NULL)
- INSERT [dbo].[tb_ErpSatisfactionSurveySet] ( [Sfss_Name], [Sfss_EnableStatus], [Sfss_DeleteStatus], [Sfss_Type], [Sfss_CreateTime], [Sfss_CreateName], [Sfss_UpdateTime], [Sfss_UpdateName]) VALUES ( N'产品满意度', 0, 0, N'5', CAST(0x0000A4BF00E9F1A7 AS DateTime), N'管理员', NULL, NULL)
- INSERT [dbo].[tb_ErpSatisfactionSurveySet] ( [Sfss_Name], [Sfss_EnableStatus], [Sfss_DeleteStatus], [Sfss_Type], [Sfss_CreateTime], [Sfss_CreateName], [Sfss_UpdateTime], [Sfss_UpdateName]) VALUES ( N'进度满意度', 0, 0, N'5', CAST(0x0000A4BF00E9F7B3 AS DateTime), N'管理员', NULL, NULL)
- INSERT [dbo].[tb_ErpSatisfactionSurveySet] ( [Sfss_Name], [Sfss_EnableStatus], [Sfss_DeleteStatus], [Sfss_Type], [Sfss_CreateTime], [Sfss_CreateName], [Sfss_UpdateTime], [Sfss_UpdateName]) VALUES ( N'服务人员1', 0, 0, N'6', CAST(0x0000A4BF00EA21C1 AS DateTime), N'管理员', NULL, NULL)
- INSERT [dbo].[tb_ErpSatisfactionSurveySet] ( [Sfss_Name], [Sfss_EnableStatus], [Sfss_DeleteStatus], [Sfss_Type], [Sfss_CreateTime], [Sfss_CreateName], [Sfss_UpdateTime], [Sfss_UpdateName]) VALUES ( N'服务人员2', 0, 0, N'6', CAST(0x0000A4BF00EA27E0 AS DateTime), N'管理员', NULL, NULL)
- IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = N'View_ErpSatisfactionReturningMattersSet')
- BEGIN
- DROP VIEW [dbo].View_ErpSatisfactionReturningMattersSet
- END
- GO
- create view View_ErpSatisfactionReturningMattersSet
- as
- SELECT tb_ErpSatisfactionReturningMattersSet.ID
- ,Sfrms_SurveySetID
- ,Sfrms_Contents
- ,Sfrms_EnableStatus
- ,Sfrms_CreateTime
- ,Sfrms_CreateName
- ,Sfrms_UpdateTime
- ,Sfrms_UpdateName
- ,Sfss_Name
- ,(CASE sfrms_EnableStatus WHEN '0' THEN '启用' ELSE '不启用' END ) as sfrms_EnableStatusName
- FROM tb_ErpSatisfactionReturningMattersSet
- left join tb_ErpSatisfactionSurveySet on tb_ErpSatisfactionReturningMattersSet.Sfrms_SurveySetID=tb_ErpSatisfactionSurveySet.ID
- go
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[tb_ErpSatisfactionSurvey](
- [ID] [int] IDENTITY(1,1) NOT NULL,
- [Sfs_OrderNumber] [nvarchar](50) NULL,
- [Sfs_OrderNumberDeputy] [nvarchar](50) NULL,
- [Sfs_EmployeeID] [nvarchar](50) NULL,
- [Sfs_Type] [int] NULL,
- [Sfs_SurveySetID] [int] NULL,
- [Sfs_ReturningMattersSetID] [int] NULL,
- [Sfs_RatingSetID] [int] NULL,
- [Sfs_Remark] [nvarchar](500) NULL,
- [Sfs_CreateName] [nvarchar](50) NULL,
- [Sfs_CreateTime] [datetime] NULL,
- [Sfs_UpdateTime] [datetime] NULL,
- [Sfs_UpdateName] [nvarchar](50) NULL,
- CONSTRAINT [PK_tb_ErpSatisfactionSurvey] PRIMARY KEY CLUSTERED
- (
- [ID] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
- ) ON [PRIMARY]
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionSurvey', @level2type=N'COLUMN',@level2name=N'ID'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionSurvey', @level2type=N'COLUMN',@level2name=N'Sfs_OrderNumber'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'副订单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionSurvey', @level2type=N'COLUMN',@level2name=N'Sfs_OrderNumberDeputy'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'调查员工ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionSurvey', @level2type=N'COLUMN',@level2name=N'Sfs_EmployeeID'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'0:订单 1:选衣 2:拍照 3:选片 4:看样 5:取件 6:服务 7:其它调查' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionSurvey', @level2type=N'COLUMN',@level2name=N'Sfs_Type'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'对象名称ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionSurvey', @level2type=N'COLUMN',@level2name=N'Sfs_SurveySetID'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'回访事项ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionSurvey', @level2type=N'COLUMN',@level2name=N'Sfs_ReturningMattersSetID'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'满意度/评分ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionSurvey', @level2type=N'COLUMN',@level2name=N'Sfs_RatingSetID'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionSurvey', @level2type=N'COLUMN',@level2name=N'Sfs_Remark'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionSurvey', @level2type=N'COLUMN',@level2name=N'Sfs_CreateName'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionSurvey', @level2type=N'COLUMN',@level2name=N'Sfs_CreateTime'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionSurvey', @level2type=N'COLUMN',@level2name=N'Sfs_UpdateTime'
- GO
- EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionSurvey', @level2type=N'COLUMN',@level2name=N'Sfs_UpdateName'
- GO
- EXEC sys.sp_addextendedproperty @name=N'tb_ErpSatisfactionSurvey', @value=N'满意度调查表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpSatisfactionSurvey'
- GO
- IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = N'View_ErpSatisfactionSurvey')
- BEGIN
- DROP VIEW [dbo].View_ErpSatisfactionSurvey
- END
- GO
- Create view [dbo].[View_ErpSatisfactionSurvey]
- as
- SELECT tb_ErpSatisfactionSurvey.ID
- ,Sfs_OrderNumber
- ,Sfs_OrderNumberDeputy
- ,Sfs_EmployeeID
- ,(select User_Name from tb_ErpUser where Sfs_EmployeeID=User_EmployeeID) as Sfs_EmployeeName
- ,Sfs_Type
- ,Sfs_SurveySetID
- ,Sfss_Name as Sfs_SurveySetName
- ,Sfs_ReturningMattersSetID
- ,Sfrms_Contents
- ,Sfs_RatingSetID
- ,Sfrs_Name as Sfs_RatingSetName
- ,Sfs_Remark
- ,Sfs_CreateName as Sfs_CreateNameID
- ,(select User_Name from tb_ErpUser where Sfs_CreateName=User_EmployeeID) as Sfs_CreateName
- ,Sfs_CreateTime
- ,Sfs_UpdateTime
- ,Sfs_UpdateName as Sfs_UpdateNameID
- ,(select User_Name from tb_ErpUser where Sfs_UpdateName=User_EmployeeID) as Sfs_UpdateName
- , Ord_CustomerName1
- ,name1
- ,Ord_CustomerTelephone1
- ,Sfrs_Scores
- ,(select count(id) from tb_ErpSatisfactionReturningMattersSet where Sfrms_SurveySetID=Sfs_SurveySetID) as SatisfactionReturningMattersSetCount
- FROM tb_ErpSatisfactionSurvey
- left join tb_ErpSatisfactionSurveySet on Sfs_SurveySetID=tb_ErpSatisfactionSurveySet.ID
- left join tb_ErpSatisfactionReturningMattersSet on Sfs_ReturningMattersSetID=tb_ErpSatisfactionReturningMattersSet.ID
- left join tb_ErpSatisfactionRatingSet on Sfs_RatingSetID=tb_ErpSatisfactionRatingSet.ID
- left join View_Customer_PaymentOrdersTwo on Sfs_OrderNumber=Ord_Number
- GO
|